A “virtual router” (an abstract representation of two or more physical routers acting as a group) can be used to increase the availability of a default gateway that services a host on a subnet. At any given time, only one of the physical routers (a “first router”) is actually routing network traffic for the host; the Internet Protocol (IP) address for the first router serves as the IP address for the virtual router, and the host uses that IP address as its default gateway. If the first router is unable to satisfactorily service the host for some reason, then it can “failover” to another physical router (a “second router”) that is spanned by the virtual router.
The Virtual Router Redundancy Protocol (VRRP) is used to assign responsibility for a virtual router to a physical router. According to VRRP, one of the physical routers in the group comprising the virtual router is assigned the highest priority (e.g., a value of 255) and consequently is identified as the owner or master, while the other physical routers in the group are assigned lower priorities and identified as backups. A backup can assume the role of master if the master cannot perform to a satisfactory level. If, for example, an interface (e.g., a port) on the master router (the first physical router) fails, then the priority of the first physical router may be reduced by an amount that corresponds to the loss of that interface. If the first physical router's priority is reduced to less than the priority of the backup router with the next highest priority, then that backup (e.g., the second physical router) becomes the master.
When the failed interface is returned to service, the priority of the first physical router (now a backup) can be increased by the amount by which it had been reduced. If as a result the priority of the first physical router increases to greater than that of the second physical router (the current master), then the first physical router again becomes master and the second physical router again becomes a backup.
An interface may become unstable and “flap” excessively—that is, it may repeatedly and frequently go in and out of service. Each time the interface goes out of service the priority of its physical router will decrease, and each time the interface returns to service, the priority of its physical router will increase. Consequently, the master and backup may repeatedly and frequently swap roles. This type of behavior will persist as long as the interface remains unstable.